package com.lcf.system.enums;

import lombok.Getter;

import java.util.Arrays;
import java.util.List;

/**
 * 描述：内置角色
 *
 * @author lcf
 * @since 2025/3/2 22:23
 */
@Getter
public enum SysRoleEnum {
    /**
     * 管理员
     */
    ADMIN("管理员", Arrays.asList("goodsCategory:add", "goodsCategory:delete", "goodsCategory:update", "goodsCategory:query",
            "sysTenant:add", "sysTenant:edit", "sysTenant:search", "user:page", "user:detail", "user:audit")),
    /**
     * 团长
     */
    LEADER("团长", Arrays.asList("goodsCart:add", "goodsCart:delete", "goodsCart:update", "goodsCart:query",
            "goodsComment:add", "goodsComment:delete", "goodsComment:update", "goodsComment:query",
            "goods:get", "goods:get", "ruleUser:signUp", "store:get", "store:list", "sysOrder:saveOrder", "sysOrder:saveCartOrder",
            "sysOrder:saveGroupOrder", "sysOrder:page", "sysOrder:getDetail", "sysOrder:getByOrderNo", "sysOrder:pickedUp",
            "sysOrder:cancel", "sysOrder:back", "sysOrder:delivery", "sysOrder:delivered", "sysOrder:pay",
            "sysTenantUser:add", "sysTenant:kickOut", "sysTenantUser:page", "sysUser:getDetail", "sysTenant:search",
            "sysTenantRule:add", "sysTenantRule:update", "sysTenantRule:remove", "sysTenantRule:getDetail", "sysTenantRule:page"
    )),
    /**
     * 消费者
     */
    CONSUMER("消费者", Arrays.asList("goodsCart:add", "goodsCart:delete", "goodsCart:update", "goodsCart:query",
            "goodsComment:add", "goodsComment:delete", "goodsComment:update", "goodsComment:query",
            "goods:get", "goods:get", "ruleUser:signUp", "store:get", "store:list", "sysOrder:saveOrder", "sysOrder:saveCartOrder",
            "sysOrder:page", "sysOrder:getDetail", "sysOrder:getByOrderNo", "sysOrder:cancel", "sysOrder:back", "sysOrder:delivered",
            "sysOrder:pay", "sysTenantRule:getDetail", "sysTenantRule:page")),
    /**
     * 农户
     */
    FARMER("农户", Arrays.asList("goods:add", "goods:delete", "goods:update", "goods:get", "goods:get",
            "store:add", "store:delete", "store:update", "store:get", "store:list", "sysOrder:stocking", "sysOrder:pickUp",
            "sysOrder:getDetail", "sysOrder:getByOrderNo", "sysOrder:pageByFarmer"));

    private final String name;
    private final List<String> permissionList;

    SysRoleEnum(String name, List<String> permissionList) {
        this.name = name;
        this.permissionList = permissionList;
    }
}
